package com.tuanzi.loan.business.repository.family.custom;

import com.tuanzi.loan.generated.jooq.loan.tables.records.LoanTopicInfoRecord;
import com.tuanzi.loan.vo.request.family.LoanAdvertSearchRequest;
import com.tuanzi.loan.vo.response.family.LoanAdvertSearchResponse;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

/**
 * @Author: chenweijun
 * @Date: 2018/11/19 16:42
 * @Description:
 */
public interface LoanAdvertRepositoryCustom {

    public enum LoanAdvertStatus {

        ONLINE("1"),OFFLINE("0");

        LoanAdvertStatus(String value){
            this.value = value;
        }
        public String getValue(){
            return this.value;
        }
        private String value;
    }

    public Integer offlineByActivityId(Long activityId);


    Page<LoanAdvertSearchResponse> list(LoanAdvertSearchRequest searchRequest, Pageable pageable);

    void delete(Integer id);

    void changeStatus(Integer id);

    void updatePosition(Integer position,Integer id);

    List<LoanTopicInfoRecord> gettopicList();


}
